package com.m3958.firstgwt.client.place;

import com.m3958.firstgwt.client.MyPlace;
import com.m3958.firstgwt.client.types.ViewNameEnum;


public class AssetEditPlace extends MyPlace{
	
	private String siteId;
	private String assetFolderId;
	private String assetId;
	
	public AssetEditPlace(String allParas){
		String[] ss = allParas.split(",");
		this.siteId = ss[0];
		if(ss.length > 1)this.assetFolderId = ss[1];
		if(ss.length > 2)this.assetId = ss[2];
	}
	
	public AssetEditPlace(String siteId,String assetFolderId,String assetId){
		this.siteId = siteId;
		this.assetFolderId = assetFolderId;
		this.assetId = assetId;
	}


	@Override
	public String getToken() {
		return ViewNameEnum.ASSET_EDIT.toString().toLowerCase() + "/" + assetFolderId + "," + assetId;
	}

	public void setSiteId(String siteId) {
		this.siteId = siteId;
	}

	public String getSiteId() {
		return siteId;
	}

	public void setAssetFolderId(String assetFolderId) {
		this.assetFolderId = assetFolderId;
	}

	public String getAssetFolderId() {
		return assetFolderId;
	}

	public void setAssetId(String assetId) {
		this.assetId = assetId;
	}

	public String getAssetId() {
		return assetId;
	}
	
}
